// n-dialog
@dialog-lr-padding: 20px;
@dialog-border-color: #eee;
@n-height: 32px;
@button-min-width: 78px;
@table-tr-height: 48px;

.n-dialog {
  padding: 0;

  .n-dialog__close {
    margin-right: @dialog-lr-padding;
    margin-top: 15px;
  }

  .n-dialog__title {
    padding: 17px @dialog-lr-padding 17px @dialog-lr-padding;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    color: @titleColor;
  }

  .n-dialog__content {
    max-height: calc(100vh - 240px);
    overflow-y: auto;
    margin: 0;
    padding: 10px @dialog-lr-padding;
    z-index: 1;
  }

  .n-form-item-label {
    padding-left: 0;
  }

  .n-dialog__action {
    padding: 2px @dialog-lr-padding @dialog-lr-padding;

    .n-button--info-type,
    .n-button--warning-type {
      --n-border: 1px solid @primaryColor !important;
      --n-border-hover: 1px solid @primaryColorHover !important;
      --n-border-pressed: 1px solid @primaryColorHover !important;
      --n-border-focus: 1px solid @primaryColorHover !important;
      --n-border-disabled: 1px solid @primaryColor !important;
      --n-color: @primaryColor !important;
      --n-color-hover: @primaryColorHover !important;
      --n-color-pressed: @primaryColorHover !important;
      --n-color-focus: @primaryColorHover !important;
      --n-color-disabled: @primaryColor !important;
      --n-ripple-color: @primaryColor !important;
    }

    .n-button {
      height: @n-height;
      line-height: @n-height;
    }
  }

  &#basic-modal {
    .n-dialog__title {
      // border-bottom: 1px solid @dialog-border-color;
      background: @titleBackgroundColor;
      border-radius: 6px 6px 0 0;
    }

    .n-dialog__content {
      padding-top: @dialog-lr-padding;
    }

    // .n-dialog__action {
    //   border-top: 1px solid @dialog-border-color;
    // }
  }
}

.n-data-table .n-data-table-expand-trigger {
  vertical-align: 0.2em;
}

// n-button
.n-button {
  min-width: @button-min-width;
  padding: 0 16px;

  &.n-button--medium-type {
    height: @n-height;
    line-height: @n-height;
  }

  &.n-button--default-type:not(.n-button--disabled--disabled) {
    --n-text-color: @titleColor !important;
  }

  &.n-button--default-type:not(.n-button--disabled--disabled):hover {
    --n-border-hover: #d4d6d9 !important;

    color: --n-text-color;
    background: linear-gradient(90deg, rgba(97, 98, 104, 0.1) 0%, rgba(97, 98, 104, 0.1) 100%);
  }
}

.n-input {
  --n-padding-vertical: calc((var(--n-height) - 2 * var(--n-font-size)) / 2);
}

// n-form
.n-form-item {
  &--medium-size {
    .n-form-item-feedback-wrapper {
      min-height: 20px;
      height: 20px;
      font-size: 12px;
    }

    &.n-form-item--left-labelled .n-form-item-label,
    .n-form-item-label,
    .n-input__input-el,
    .n-base-selection,
    .n-base-selection-label {
      min-height: @n-height;
      height: @n-height;
      line-height: 1.35;
      align-items: center !important;
    }

    .n-base-selection .n-base-selection-tags {
      --n-height: @n-height;

      height: @n-height;
      padding-top: 1px;
    }

    .n-base-selection-tag-wrapper .n-tag {
      height: 24px;
    }
  }

  .n-form-item-label .n-form-item-label__text {
    // line-height: @n-height;
    color: @titleColor;
  }

  .n-form-item-label .n-form-item-label__asterisk {
    color: @dangerColor;
    font-size: 16px;
  }
}

// n-data-table
.n-data-table {
  .n-data-table-th {
    background: @tableHeaderBackgroundColor;
    height: @table-tr-height;
    font-weight: 600;
    border-color: @tableBorderColor;
    color: @titleColor;

    .tableTip {
      color: @dangerColor;
      margin-right: 3px;
      font-size: 16px;
      font-weight: normal;
    }
  }

  .n-data-table-td {
    height: @table-tr-height;
    border-color: @tableBorderColor !important;
    padding-top: 6px;
    padding-bottom: 6px;
    color: @titleColor;

    .n-input__input-el,
    .n-base-selection,
    .n-base-selection-label {
      min-height: @n-height !important;
      height: @n-height !important;
      line-height: @n-height !important;
    }

    .n-base-selection .n-base-selection-tags {
      --n-height: @n-height;

      height: @n-height;
      padding-top: 1px;
    }

    .n-base-selection-tag-wrapper .n-tag {
      height: 24px;
    }

    .n-ellipsis.n-ellipsis--line-clamp {
      vertical-align: bottom;
      width: 100%;
    }
  }

  .tableAction {
    div {
      margin-left: 0;
    }
  }

  .n-ellipsis {
    span {
      word-break: break-all;
    }
  }

  .n-data-table-empty {
    .n-empty__icon {
      width: 100px;
      height: 100px;
    }
  }
}

.table-shutdownReason {
  .n-data-table-base-table-header {
    .n-data-table-table {
      .n-data-table-thead {
        .n-data-table-tr {
          .n-data-table-th {
            .n-checkbox--inside-table {
              display: none !important;
            }
          }
        }
      }
    }
  }
}

.n-empty .n-empty__icon {
  width: 100px;
  height: 100px;
  // margin-top: 60px;
}

.n-empty .n-empty__icon + .n-empty__description {
  margin-top: 0;
}

.n-tree-select-menu__empty {
  //树形下拉去除空数据图标
  .n-empty {
    .n-empty__icon {
      display: none !important;
    }

    .n-empty__icon + .n-empty__description {
      margin-top: 0;
    }
  }
}

.n-base-select-menu__empty {
  .n-empty {
    .n-empty__icon {
      display: none !important;
    }

    .n-empty__icon + .n-empty__description {
      margin-top: 0;
    }
  }
}

.tabs {
  .n-tabs-tab__label {
    font-size: 16px;
    color: @titleColor;
  }

  .n-tab-pane {
    padding-top: 20px;
  }

  .n-tabs-tab--active {
    .n-tabs-tab__label {
      color: @menuActiveColor !important;
    }
  }

  .n-tabs-bar {
    background-color: @menuActiveColor !important;
  }
}

.table-body-content {
  .n-data-table-empty {
    .n-empty__icon {
      width: 40px;
      height: 36px;
    }
  }
}

.up-box {
  .n-upload-dragger {
    border: 1px dashed #d4d6d9 !important;
    border-radius: 4px !important;

    &:hover {
      border: 1px dashed #307AFA !important;
    }
    // &:active,
    // &:visited,
    // &:focus {
    //   border: 1px dashed #307AFA !important;
    //   background: rgba(255, 73, 73, 0.05)!important;
    // }
    // &:blur {
    //   border: 1px dashed #d4d6d9 !important;
    //   background: #fff;
    // }
    &.n-upload-dragger--disabled {
      &:hover {
        border: 1px dashed #d4d6d9 !important;
      }
    }
  }
}

.n-input__border {
  --n-border-error: 1px solid #f5222d !important;
  --n-border-focus-error: 1px solid #f5222d !important;
  --n-border-hover-error: 1px solid #f5222d !important;
}

.n-form-item-feedback--error {
  color: #f5222d !important;
}

.n-input-wrapper {
  --n-border-error: 1px solid #f5222d !important;
  --n-border-focus-error: 1px solid #f5222d !important;
  --n-border-hover-error: 1px solid #f5222d !important;
}

.n-input--error-status {
  --n-border-error: 1px solid #f5222d !important;
  --n-border-focus-error: 1px solid #f5222d !important;
  --n-border-hover-error: 1px solid #f5222d !important;
}

.attachment-wrap {
  .fujian {
    font-size: 16px;
  }

  .n-button {
    --n-border: 1px solid #d4d6d9 !important;

    background: #fff;
    border-radius: 4px;
    font-size: 14px;
    color: #31373d;
    line-height: 14px;
  }

  .n-button:not(.n-button--disabled):hover {
    --n-text-color-hover: #707177;

    // background: #fff !important;
    // --n-border: 1px solid #d4d6d9 !important;
    // --n-border-hover: 1px solid #707177 !important;
    color: #707177;

    .icon-attachment {
      opacity: 0.7;
    }
  }

  .n-button:not(.n-button--disabled):focus {
    --n-border-focus: 1px solid #d4d6d9 !important;

    background-color: #fff;
    color: #31373d;
  }

  .icon-attachment {
    margin-right: 8px;
  }
}

.attachment-main {
  .file-list {
    a {
      color: #1d6eff;
      display: inline-block;
      max-width: 200px;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
      vertical-align: bottom;

      &:hover {
        text-decoration: underline;
      }

      .n-icon {
        color: #1d6eff;
        font-size: 16px;
        margin-top: -2px;
      }

      .fujian {
        margin-top: -2px;
      }
    }
  }
}

.n-descriptions-table-content {
  &__content {
    color: @titleColor !important;
  }
}

// .n-button--disabled {
//   &:hover {
//     background: #fff !important;
//   }
// }
.parts-num {
  color: #1d6eff;
  font-size: 12px;
  display: flex;
  align-items: center;

  .n-input-number {
    width: 100px;
    height: 28px !important;

    .n-input {
      height: 28px !important;

      .n-input__input-el {
        height: 28px !important;
      }
    }
  }
}

// .tools-table {
//   .n-data-table .n-data-table-td {
//     // border-bottom: 1px solid rgba(239, 239, 245, 1) !important;
//   }
//     .n-data-table {
//     // border: 1px solid rgba(239, 239, 245, 1) !important;

//     // --n-merged-border-color: none !important;
//   }
//   .n-data-table-tr {
//     &:last-child {
//       .n-data-table-td {
//         border-bottom: none !important;
//       }
//     }
//   }
// }

.n-tree {
  .n-tree-node-content .n-tree-node-content__text {
    word-break: break-all !important;
  }
}

.df-descriptions {
  word-break: break-all;
}

.df-select-tags {
  .n-base-selection {
    height: 56px;
  }

  .n-base-selection-tags {
    // --n-height: 56px !important;
    height: 56px !important;
    padding-top: 8px !important;
    align-items: flex-start;
  }

  .n-base-selection-overlay {
    align-items: flex-start;
    padding-top: 8px !important;
  }

  .n-base-selection-placeholder__inner {
    margin-top: 7px;
  }

  .n-base-selection .n-base-selection-input-tag {
    line-height: 32px;
  }

  .n-tag.n-tag--round {
    border-radius: 20px;
    height: 32px;
    padding: 0 14px 0 12px;
    color: #1d6eff;
    background: #eaf2ff;
  }

  .n-tag .n-tag__close {
    margin-left: 5px;
    color: #1d6eff;
    font-size: 12px;
  }

  .n-tag .n-tag__border {
    border-color: #1d6eff;
  }

  .n-base-selection-tag-wrapper .n-tag .n-tag__content {
    line-height: normal;
  }
}
